// 通用文本框
.box {
  border-radius: 4px;
  padding: 11px 13px;
  position: relative;
  white-space: pre-wrap;
  word-break: break-all;
  word-wrap: break-word;

  :global(.chat-record-receive) & {
    background-color: #eff2f7;
  }
  :global(.chat-record-send) & {
    background-color: #cce4fd;
  }

  :global(.emoji) {
    width: 24px;
  }
}
.box {
  @arrow-size: 7px;
  &:before {
    border-bottom: @arrow-size solid transparent;
    border-top: @arrow-size solid transparent;
    content: '';
    height: 0;
    position: absolute;
    top: 10px;
    width: 0;
  }
  :global(.chat-record-receive) & {
    margin-left: (@arrow-size / 2);
    &:before {
      border-right: @arrow-size solid #eff2f7;
      left: -@arrow-size;
    }
  }
  :global(.chat-record-send) & {
    margin-right: (@arrow-size / 2);
    &:before {
      right: -@arrow-size;
      border-left: @arrow-size solid #cce4fd;
    }
  }
}

// 展开/折叠按钮
.fold {
  margin-left: 0.5em;
}

// 通知类消息
.notice-record {
  color: #aaa;
  font-size: 13px;
  padding: 0 50px;
  text-align: center;
  word-break: break-all;
  word-wrap: break-word;
  .time {
    font-size: 12px;
  }
}

// =============================================

.record-text {
  :global(.emoji) {
    width: 24px;
  }
}

.record-image {
  border-radius: 3px;
  display: block;
}
.record-image-refresh {
  align-items: center;
  background-color: #fafafa;
  border-radius: 3px;
  border: 1px solid #f0f0f0;
  color: #aaa;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  height: 160px;
  justify-content: center;
  width: 165px;
  :global(.anticon) {
    color: #777;
    font-size: 30px;
    margin-bottom: 20px;
  }
}
.record-image-qrcode-link {
  color: #999;
  &:hover {
    text-decoration: underline;
  }
}

.record-file {
  align-items: center;
  border-radius: 4px;
  border: 1px solid #ddd;
  color: #555;
  display: flex;
  padding: 20px 16px;
  box-shadow: 1px 2px 3px #fafafa;

  :global(.anticon) {
    color: #ccc;
    font-size: 30px;
    margin-left: 20px;
  }

  .name {
    min-width: 12em;
    max-width: 20em;
    word-wrap: break-word;
    word-break: break-all;
  }
}

.record-link-card {
  @top: 14px;
  @side: 16px;

  background-color: #fff;
  border-radius: 4px;
  border: 1px solid #ddd;
  box-shadow: 1px 2px 3px #fafafa;
  cursor: pointer;
  display: block;
  max-width: 20em;
  min-width: 15em;
  padding: @top @side;

  .title {
    color: #333;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    word-break: break-all;
    word-wrap: break-word;
  }

  main {
    align-items: flex-start;
    display: flex;
    margin-top: 6px;
  }

  aside {
    float: right;
    vertical-align: middle;
  }

  .describe {
    color: #aaa;
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
    margin: 0 12px 0 0;
    white-space: pre-wrap;
  }

  .thumb {
    align-items: center;
    display: flex;
    height: 50px;
    overflow: hidden;
    img {
      width: 50px;
    }
    :global(.anticon) {
      color: #ccc;
      font-size: 30px;
    }
  }
}
.record-link-card-accept {
  font-size: 12px;
  margin-top: 6px;
}

.record-person-card {
  border-radius: 4px;
  border: 1px solid #ddd;
  box-shadow: 1px 2px 3px #fafafa;
  max-width: 20em;

  main {
    align-items: center;
    display: flex;
    padding: 14px 12px 0;
  }

  img {
    border-radius: 6px;
    width: 60px;
    height: 60px;
    margin-right: 12px;
  }

  .name {
    font-size: 13px;
    line-height: 1.4;
    max-width: 20em;
    min-width: 10em;
    word-break: break-all;
    word-wrap: break-word;
  }

  footer {
    border-top: 1px solid #eee;
    color: #777;
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    margin-top: 10px;
    padding: 3px 12px 2px;
  }
}

.record-miniprogram,
.record-videonum {
  width: 280px;
  main {
    background-color: #fff;
    border-radius: 3px;
    border: 1px solid #f0f0f0;
  }
  .type-name {
    align-items: center;
    border-top: 1px solid #f0f0f0;
    color: #999;
    display: flex;
    font-size: 12px;
    svg {
      height: 1em;
      margin-right: 2px;
      width: 1em;
    }
  }
  footer {
    background-color: #eee;
    border-radius: 1px;
    color: #bbb;
    font-size: 12px;
    margin-top: 10px;
    padding: 6px 12px;
  }
}

.record-miniprogram {
  main {
    padding: 11px 13px 0 13px;
  }
  header {
    align-items: center;
    color: #999;
    display: flex;
    font-size: 12px;
    letter-spacing: 1px;
    word-break: break-all;
    word-wrap: break-word;
  }
  .type-name {
    padding: 4px 2px;
    svg {
      color: #7b88cb;
    }
  }
  .logo {
    @size: 18px;
    border-radius: @size;
    height: @size;
    margin-right: 5px;
    width: @size;
  }
  .title {
    font-size: 15px;
    padding: 0.5em 0;
    word-break: break-all;
    word-wrap: break-word;
  }
  .cover {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 3px 3px 0 0;
    height: 230px;
    margin-bottom: 0.7em;
  }
}

.record-videonum {
  .image {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 3px 3px 0 0;
    height: 280px;
  }
  .info {
    align-items: center;
    display: flex;
    padding: 8px 13px 8px;
  }
  .logo {
    @size: 24px;
    border-radius: @size;
    height: @size;
    margin-right: 8px;
    width: @size;
  }
  :global(.ant-typography) {
    margin: 0;
  }
  .type-name {
    padding: 4px 0;
    margin: 0 13px;
    svg {
      color: #eb9143;
    }
  }
}

.record-position > footer,
.record-redpocket > footer,
.record-transfer-money > footer {
  background-color: #eee;
  border-radius: 1px;
  color: #bbb;
  font-size: 12px;
  margin-top: 10px;
  padding: 6px 12px;
}

.record-position main {
  align-items: center;
  border-radius: 3px;
  border: 1px solid #f0f0f0;
  display: flex;
  padding: 10px 12px;
  max-width: 240px;
  :global(.anticon) {
    font-size: 36px;
    color: #55b969;
    margin-right: 12px;
  }
  .info {
    word-wrap: break-word;
    word-break: break-all;
  }
  .title {
    font-size: 14px;
    margin-bottom: 3px;
  }
  .address {
    font-size: 12px;
    color: #aaa;
  }
}

.record-redpocket main {
  border-radius: 3px;
  border: 1px solid #f0f0f0;
  padding: 0 8px;
  .content {
    display: flex;
    align-items: center;
    padding: 6px 0;
  }
  :global(.anticon) {
    font-size: 36px;
    color: #d2544f;
    margin-right: 12px;
  }
  .remark {
    color: #555;
    word-wrap: break-word;
    word-break: break-all;
    line-height: 1.3;
    margin-bottom: 2px;
  }
  .money {
    font-size: 18px;
  }
  footer {
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    padding: 2px 0;
    color: #999;
  }
}

.record-transfer-money {
  width: 220px;
}
.record-transfer-money main {
  border-radius: 3px;
  padding: 0 8px;
  background-color: #eeaa61;
  color: #fff;
  .content {
    display: flex;
    align-items: center;
    padding: 12px 0;
  }
  :global(.anticon) {
    font-size: 36px;
    margin-right: 12px;
  }
  footer {
    border-top: 1px solid rgba(#fff, 0.5);
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    opacity: 0.7;
    padding: 4px 0;
  }
}
